home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1993…ch: Other People's Memory / ADC Developer CD (1993-03) (''Other People's Memory'')_iso / Dev.CD Mar 93.iso / Development Platforms / CSMP Digests / csmp-v1-033.txt < prev    next >
Encoding:
Text File  |  1992-11-18  |  46.1 KB  |  1,460 lines  |  [TEXT/MPS ]

  1. C.S.M.P. Digest             Fri, 27 Mar 92       Volume 1 : Issue 33
  2.  
  3. Today's Topics:
  4.  
  5.     Yet another horizontal line fill routine...
  6.     MacApp3 & ViewEdit ?
  7.     MPW .o -> ThC 5 library
  8.     Bug in Sys70 SetFPos?
  9.     MoveWindow using unused stack portion as scratch?
  10.     Closing windows in MacApp
  11.     Comm Toolbox problems with THINK C in XCMD environment
  12.     OOP Power for TP Programmers  Was: Re: Book for TCL
  13.  
  14.  
  15. The Comp.Sys.Mac.Programmer Digest is moderated by Michael A. Kelly.
  16.  
  17. These digests are available (by using FTP, account anonymous, your email
  18. address as password) in the pub/mac/csmp-digest directory on ftp.cs.uoregon.
  19. edu.  This is also the home of the comp.sys.mac.programmer Frequently Asked
  20. Questions list.
  21.  
  22. These digests are also available via email.  Just send a note saying that you
  23. want to be on the digest mailing list to mkelly@cs.uoregon.edu, and you will
  24. automatically receive each new digest as it is created.
  25.  
  26. The articles in these digests are taken directly from comp.sys.mac.programmer.
  27. They are not edited; all articles included in this digest are in their original
  28. posted form.  The only articles that are -not- included in these digests are
  29. those which didn't receive any replies (except those that give information
  30. rather than ask a question).  All replies to each article are concatenated
  31. onto the original article in the order in which they were received.  Article
  32. threads are not added to the digests until the last article added to the
  33. thread is at least one month old (this is to ensure that the thread is dead
  34. before adding it to the digests).
  35.  
  36. Send administrative mail to mkelly@cs.uoregon.edu.
  37.  
  38. -------------------------------------------------------
  39.  
  40. From: taihou@iss.nus.sg (Tng Tai Hou)
  41. Subject: Yet another horizontal line fill routine...
  42. Organization: Institute of Systems Science, NUS, Singapore
  43. Date: Mon, 24 Feb 1992 09:22:20 GMT
  44.  
  45. Here is a new, hopefully improved horizontal line fill routine. workable only
  46. for 8-bits displays.
  47. The variable value is a longword with each of its bytes containing similar
  48. 8-bit color index information.
  49.  
  50. This version checks for long word alignment and fills accordingly.
  51. I have released two versions, a 'c' version with simple assembly, and a
  52. hand-tuned assembly version. Again, as in my previous posting, I would
  53. appreciate if you kind folks could give me your feedback. Have I make
  54. the best of 68020 instruction set and whatever caches there are on these
  55. chips? If you spot any bugs, or perhaps if it doesn't perform longword
  56. alignment fills etc, do let me know.
  57.  
  58. Your help is very much appreciated.
  59. Thanks.
  60.  
  61. Tai Hou
  62. Singapore
  63.  
  64. - ------------------
  65.  
  66. void
  67. MyAAAMemSet (register unsigned long *buf, register unsigned long value,
  68.              register unsigned long count)
  69. {
  70.     register long rem;
  71.     register int i;
  72.     register long remBuf;
  73.     
  74.     if (count < 4)
  75.     {
  76.         for (i=0; i<count; i++)
  77.         {
  78.             asm {
  79.                 move.b    value, (buf)+
  80.             }
  81.         }
  82.     }
  83.     else {
  84.         remBuf = 4 - (long)buf % 4;
  85.         remBuf %= 4;
  86.         
  87.         for (i=0; i<remBuf; i++)
  88.         {
  89.             asm {
  90.                 move.b    value, (buf)+
  91.             }
  92.         }
  93.         count -= remBuf;
  94.          rem = count % 4;
  95.         if (rem == 0)
  96.         {
  97.             for (i=0; i<count; i+=4)
  98.                 *buf++ = value;
  99.         }
  100.         else {
  101.             count &= 0xFFFFFFFC;
  102.             for (i=0; i<count; i+=4)
  103.                 *buf++ = value;
  104.             for (i=0; i<rem; i++)
  105.             {
  106.                 asm {
  107.                     move.b    value, (buf)+
  108.                 }
  109.             }
  110.         }
  111.     }
  112. }
  113.  
  114.  
  115. /* count != 0 */
  116. void
  117. A1_MemSet (/*register unsigned long *buf, register unsigned long value,
  118. register unsigned long count*/)
  119. {
  120.     asm {
  121.                 movem.l    4(sp),    d0-d2        /* d0 = buf, d1 = value, d2 = count
  122. */
  123.                 movea.l    d0,        a0            /* ao = d0 */
  124.  
  125.                 cmp.l    #4,        d2
  126.                 bge        @GE4
  127.                 
  128.                 movea.l    d2,    a1                /* a1 = p */
  129.                 add.l    a0,    a1
  130.         @a0:    move.b    d1,    (a0)+
  131.                 cmp.l    a0,    a1
  132.                 bne        @a0
  133.                 bra        @end
  134.  
  135.         @GE4:    move.l    a0,    d3            /* d3 = remBuf */
  136.                 andi.l    #3,        d3
  137.                 subq.l    #4,        d3
  138.                 neg.l    d3
  139.                 andi.l    #3,        d3
  140.                 beq        @REMBUF0
  141.  
  142.                 movea.l    d3,    a1
  143.                 add.l    a0,    a1
  144.         @a1:    move.b    d1,    (a0)+
  145.                 cmp.l    a0,    a1
  146.                 bne        @a1
  147.  
  148.         @REMBUF0:
  149.                 sub.l    d3,    d2
  150.                 move.l    d2,    d5            /* d5 = rem */
  151.                 andi.l    #3,        d5
  152.                 bne        @REMNOT0
  153.  
  154.                 movea.l    d2,    a1
  155.                 add.l    a0,    a1
  156.         @a2:    move.l    d1,    (a0)+
  157.                 cmp.l    a0,    a1
  158.                 bne        @a2
  159.                 bra        @end
  160.  
  161.         @REMNOT0:
  162.                 andi.l    #0xFFFFFFFC,    d2
  163.                 cmp.l    #0x0,    d2
  164.                 beq        @a4
  165.                 movea.l    d2,    a1
  166.                 add.l    a0,    a1
  167.         @a3:    move.l    d1,    (a0)+
  168.                 cmp.l    a0,    a1
  169.                 bne        @a3
  170.                 
  171.         @a4:    movea.l    d5,    a1
  172.                 add.l    a0,    a1
  173.         @a5:    move.b    d1,    (a0)+
  174.                 cmp.l    a0,    a1
  175.                 bne        @a5
  176.         @end:
  177.     }
  178. }
  179.  
  180.  
  181.  
  182. ---------------------------
  183.  
  184. From: gilbertd@sunflower.bio.indiana.edu (Don Gilbert)
  185. Subject: MacApp3 & ViewEdit ?
  186. Date: 10 Feb 92 22:22:10 GMT
  187. Organization: Biology, Indiana University - Bloomington
  188.  
  189.  
  190. I am ready to think about switching from MacApp 2 to
  191. MacApp 3.  I notice that 'view' is switching to 'View',
  192. a different view format.  I rely heavily on ViewEdit
  193. to build displays.  Will ViewEdit be supported for MacApp 3?
  194. Will the current version work with MacApp 3 Views
  195. (i haven't tried)?   
  196.  
  197. Thanks,  Don
  198.  
  199. P.s., If ViewEdit is upgraded, please make the 
  200. "[x] use horizontal/vertical grid" a sticky user preference
  201. or else change the default to "[ ]" (don't use grid).
  202. I hate having to change those buttons each time I edit
  203. a view.
  204. -- 
  205. Don Gilbert                                     gilbert@bio.indiana.edu
  206. biocomputing office, biology dept., indiana univ., bloomington, in 47405
  207.  
  208.  
  209.  
  210. - -------------------------
  211.  
  212. From: alex@jax.org (Alex Smith)
  213. Subject:  MacApp3 & ViewEdit ?
  214. Date: 12 Feb 92 00:54:19 GMT
  215. Organization: The Jackson Laboratory
  216.  
  217. In article <1992Feb10.222210.15595@bronze.ucs.indiana.edu> gilbertd@sunflower.bio.indiana.edu (Don Gilbert) writes:
  218. >
  219. >I am ready to think about switching from MacApp 2 to
  220. >MacApp 3.  I notice that 'view' is switching to 'View',
  221. >a different view format.  I rely heavily on ViewEdit
  222. >to build displays.  Will ViewEdit be supported for MacApp 3?
  223. >Will the current version work with MacApp 3 Views
  224. >(i haven't tried)?   
  225.  
  226.     No. It can only edit 'view' resources. But there's a utility called
  227.     "ViewPromoter" (with MacApp 3.0) that converts 'view' resources to their
  228.     'View' equivalents. It works reasonably well. The version on ETO #5 does
  229.     not handle all things, so prepare yourself to use Rez to patch up your
  230.     'Views'. (Can't speak for the version with 3.0b3 -- I just got the CD
  231.     yesterday.) In any case MacApp 3.0 understands both types (for now).
  232.  
  233.     ViewEdit 3.0d11 was distributed to the MacApp3Beta$ list on AppleLink
  234.     in December, but didn't make it into ETO #6. Perhaps Kent would
  235.     be kind enough to put it somewhere on AppleLink where others can
  236.     find it :-).
  237.  
  238. >
  239. >Thanks,  Don
  240. >
  241. >P.s., If ViewEdit is upgraded, please make the 
  242. >"[x] use horizontal/vertical grid" a sticky user preference
  243. >or else change the default to "[ ]" (don't use grid).
  244. >I hate having to change those buttons each time I edit
  245. >a view.
  246. >-- 
  247. >Don Gilbert                                     gilbert@bio.indiana.edu
  248. >biocomputing office, biology dept., indiana univ., bloomington, in 47405
  249.  
  250.  
  251. Alex Smith                Internet: alex@jax.org
  252. The Jackson Laboratory            AppleLink: A.G.SMITH
  253.  
  254.  
  255.  
  256. - -------------------------
  257.  
  258. From: ksand@apple.com (Kent Sandvik)
  259. Subject:  MacApp3 & ViewEdit ?
  260. Date: 13 Feb 92 01:32:33 GMT
  261. Organization: MacDTS Mongols
  262.  
  263. In article <1992Feb10.222210.15595@bronze.ucs.indiana.edu>, gilbertd@sunflower.bio.indiana.edu (Don Gilbert) writes:
  264. > I am ready to think about switching from MacApp 2 to
  265. > MacApp 3.  I notice that 'view' is switching to 'View',
  266. > a different view format.  I rely heavily on ViewEdit
  267. > to build displays.  Will ViewEdit be supported for MacApp 3?
  268. > Will the current version work with MacApp 3 Views
  269. > (i haven't tried)?   
  270.  
  271. The MacApp 3.0 final distribution will have ViewEdit 3.0, which
  272. will read and write 'View' resources. ETO#7 out in March will have 
  273. MacApp 3.0 final - the framework.
  274.  
  275. If you like IcePick, there's a ViewPromoter tool which will convert
  276. 'view' resources to 'View' ones. Also, speaking from a practical
  277. point of view it seems that I mostly write the first resource hacks using IcePick,
  278. do some fine tuning using ViewEdit 3.0, and finally do the low level
  279. nitty-picky tuning with text versions of the 'View' resources.
  280.  
  281. The MacApp 3.0b3 had the possibility to read 'view' style resources
  282. if you recompiled the framework with suitable flags, but I'm not 
  283. 100% this is the case with 3.0 final.
  284.  
  285. Kent Sandvik/DTS
  286. (gc) 
  287. (gc!!!)
  288.  
  289.  
  290.  
  291. - -------------------------
  292.  
  293. From: molla@paone.uucp (Levent Mollamustafaoglu)
  294. Subject:  MacApp3 & ViewEdit ?
  295. Date: 14 Feb 92 07:10:50 GMT
  296. Organization: Aiken Computation Lab, Harvard University
  297.  
  298. In article <20270@goofy.Apple.COM> ksand@apple.com (Kent Sandvik) writes:
  299. >The MacApp 3.0 final distribution will have ViewEdit 3.0, which
  300. >will read and write 'View' resources. ETO#7 out in March will have 
  301. >MacApp 3.0 final - the framework.
  302.  
  303. Although this is a marketing question, let me ask : Will MacApp 3.0
  304. be offered separately, outside ETO? ETO becomes too expensive
  305. outside the U.S.A.. (Not for commercial developers, but I think
  306. non-commercial developers would also like to have it. :-) )
  307.  
  308.  
  309. ===========================================================================
  310. Dr. Levent Mollamustafaoglu       Harvard University    
  311. molla@paone.harvard.edu    molla@metatron.harvard.edu
  312. ===========================================================================
  313.  
  314.  
  315.  
  316. - -------------------------
  317.  
  318. From: ksand@apple.com (Kent Sandvik)
  319. Subject:  MacApp3 & ViewEdit ?
  320. Date: 14 Feb 92 07:51:51 GMT
  321. Organization: MacDTS Mongols
  322.  
  323. In article <1992Feb12.005419.24629@jax.org>, alex@jax.org (Alex Smith) writes: 
  324. >     No. It can only edit 'view' resources. But there's a utility called
  325. >     "ViewPromoter" (with MacApp 3.0) that converts 'view' resources to their
  326. >     'View' equivalents. It works reasonably well. The version on ETO #5 does
  327. >     not handle all things, so prepare yourself to use Rez to patch up your
  328. >     'Views'. (Can't speak for the version with 3.0b3 -- I just got the CD
  329. >     yesterday.) In any case MacApp 3.0 understands both types (for now).
  330.  
  331. >     ViewEdit 3.0d11 was distributed to the MacApp3Beta$ list on AppleLink
  332. >     in December, but didn't make it into ETO #6. Perhaps Kent would
  333. >     be kind enough to put it somewhere on AppleLink where others can
  334. >     find it :-).
  335.  
  336. If I would be a 20-year-old Kent Sandvik with rebel blood in my veins
  337. I would do it. But I have a nine month old son and a wife and I need to
  338. keep my job in our one-income family :-). Anyway, if Tom Chavez says
  339. OK we might upload it on AppleLink...
  340.  
  341. Just to mention a secret, ViewEdit 3.0b2 will be on ETO#7, out in March.
  342. I'm using IcePick, and I'm doing the final touches  with raw 'View' 
  343. text format (yes, we need to document the 'View' format...).
  344.  
  345. Kent Sandvik/DTS
  346.  
  347.  
  348.  
  349. - -------------------------
  350.  
  351. From: ksand@apple.com (Kent Sandvik)
  352. Subject:  MacApp3 & ViewEdit ?
  353. Date: 17 Feb 92 03:01:29 GMT
  354. Organization: MacDTS Mongols
  355.  
  356. In article <1992Feb14.071050.11630@das.harvard.edu>, molla@paone.uucp (Levent Mollamustafaoglu) writes:
  357. > In article <20270@goofy.Apple.COM> ksand@apple.com (Kent Sandvik) writes:
  358. > >The MacApp 3.0 final distribution will have ViewEdit 3.0, which
  359. > >will read and write 'View' resources. ETO#7 out in March will have 
  360. > >MacApp 3.0 final - the framework.
  361.  
  362. > Although this is a marketing question, let me ask : Will MacApp 3.0
  363. > be offered separately, outside ETO? ETO becomes too expensive
  364. > outside the U.S.A.. (Not for commercial developers, but I think
  365. > non-commercial developers would also like to have it. :-) )
  366.  
  367. No problems, it will be available as an APDA product. The difference compared
  368. with ETO CDs is that the documentation has to be ready before APDA ships the
  369. product. We are able to release 3.0 final on ETOs without worrying about 
  370. paper documentation. I don't know the exact dates when 3.0 is an APDA product,
  371. but we are talking about N weeks.
  372.  
  373. Kent Sandvik/DTS
  374. - -
  375. not speaking for DTS...
  376.  
  377.  
  378.  
  379. - -------------------------
  380.  
  381. From: molla@paone.uucp (Levent Mollamustafaoglu)
  382. Subject:  MacApp3 & ViewEdit ?
  383. Date: 18 Feb 92 17:06:23 GMT
  384. Organization: Aiken Computation Lab, Harvard University
  385.  
  386. In article <20414@goofy.Apple.COM> ksand@apple.com (Kent Sandvik) writes:
  387. >
  388. >No problems, it will be available as an APDA product. The difference compared
  389. >with ETO CDs is that the documentation has to be ready before APDA ships the
  390. >product. We are able to release 3.0 final on ETOs without worrying about 
  391. >paper documentation. I don't know the exact dates when 3.0 is an APDA product,
  392. >but we are talking about N weeks.
  393. >
  394. This might be a FAQ for this group, so excuse me if it was asked before :
  395. Does MacApp 3.0 only have a C++ version?
  396.  
  397.  
  398. ===========================================================================
  399. Dr. Levent Mollamustafaoglu       Harvard University    
  400. molla@paone.harvard.edu    molla@metatron.harvard.edu
  401. ===========================================================================
  402.  
  403.  
  404.  
  405. - -------------------------
  406.  
  407. From: keith@Apple.COM (Keith Rollin)
  408. Subject:  MacApp3 & ViewEdit ?
  409. Date: 25 Feb 92 03:34:17 GMT
  410. Organization: Apple Computer Inc., Cupertino, CA
  411.  
  412. In article <1992Feb18.170623.22491@das.harvard.edu> molla@paone.uucp (Levent Mollamustafaoglu) writes:
  413. >>
  414. >This might be a FAQ for this group, so excuse me if it was asked before :
  415. >Does MacApp 3.0 only have a C++ version?
  416.  
  417. MacApp 3.0 is written entirely in C++, and will most likely stay that
  418. way. This means that if the pre-compiled libraries that come with
  419. MacApp are not sufficient for you and you need to compile your own
  420. version, you will need C++. However, you can still write your own code
  421. in MPW Pascal if you want; it will link with MacApp just fine.
  422.  
  423. -- 
  424. - ----------------------------------------------------------------------------
  425. Keith Rollin           ---            <Taligent .signature under construction>
  426. Disclaimer: Pretty soon, I really _won't_ be speaking for Apple...
  427.  
  428.  
  429.  
  430. - -------------------------
  431.  
  432. From: molla@paone.uucp (Levent Mollamustafaoglu)
  433. Subject:  MacApp3 & ViewEdit ?
  434. Date: 25 Feb 92 06:44:40 GMT
  435. Organization: Aiken Computation Lab, Harvard University
  436.  
  437. In article <63170@apple.Apple.COM> keith@Apple.COM (Keith Rollin) writes:
  438. >In article <1992Feb18.170623.22491@das.harvard.edu> molla@paone.uucp (Levent Mollamustafaoglu) writes:
  439. >>>
  440. >>This might be a FAQ for this group, so excuse me if it was asked before :
  441. >>Does MacApp 3.0 only have a C++ version?
  442. >
  443. >MacApp 3.0 is written entirely in C++, and will most likely stay that
  444. >way. This means that if the pre-compiled libraries that come with
  445. >MacApp are not sufficient for you and you need to compile your own
  446. >version, you will need C++. However, you can still write your own code
  447. >in MPW Pascal if you want; it will link with MacApp just fine.
  448. >
  449. So this seems to rule out Think Pascal, unless it can directly use
  450. MPW libraries, which I doubt.
  451.  
  452.  
  453. ===========================================================================
  454. Dr. Levent Mollamustafaoglu       Harvard University    
  455. molla@paone.harvard.edu    molla@metatron.harvard.edu
  456. ===========================================================================
  457.  
  458.  
  459.  
  460. - -------------------------
  461.  
  462. From: wilkins@jarthur.claremont.edu (Mark Wilkins)
  463. Subject:  MacApp3 & ViewEdit ?
  464. Date: 25 Feb 92 13:30:51 GMT
  465. Organization: Harvey Mudd College, Claremont, CA 91711
  466.  
  467. In article <1992Feb25.064440.17654@das.harvard.edu> molla@paone.uucp (Levent Mollamustafaoglu) writes:
  468. >So this seems to rule out Think Pascal, unless it can directly use
  469. >MPW libraries, which I doubt.
  470.  
  471.   No.  Can't you just add MPW object files to THINK Pascal projects using
  472. the same command you would use to add a source file?
  473.  
  474.   I spent hours trying to find the oConv utility on the THINK Pascal disks
  475. and finally called tech support. :-)
  476.  
  477. -- Mark Wilkins
  478. -- 
  479. - -----------------------------------------------------------------------------
  480. "Do your schools offer, and would you consider taking,  |       Mark R. Wilkins
  481. remedial courses in spelling and grammar?  This is one  | wilkins@jarthur.
  482. area where your 28 or 48 can't help you."               |         claremont.edu
  483.  
  484.  
  485.  
  486. ---------------------------
  487.  
  488. From: ecr2@ellis.uchicago.edu (Corp Reed)
  489. Subject: MPW .o -> ThC 5 library
  490. Date: 15 Feb 92 20:09:04 GMT
  491. Organization: none
  492.  
  493. I have a rather large MPW .o file that I want to convert to a Think C
  494. library.  I have looked at the manuals and couldn't find any obvious way
  495. to do this.  The library is too large for oConv to work on.
  496.  
  497. Is it possible to just convert part of the library and use it to call
  498. the other part w/some weird MPW compiling option?  Would there be any significant reason why this wouldn't work?
  499.  
  500. -C Reed.
  501. Mac Programming Junkie.
  502.  
  503.  
  504.  
  505. - -------------------------
  506.  
  507. From: Roger.W.Brown@dartmouth.edu (Roger W. Brown)
  508. Subject:  MPW .o -> ThC 5 library
  509. Date: 25 Feb 92 16:01:23 GMT
  510. Organization: Dartmouth College, Hanover, NH
  511.  
  512. In article <1992Feb15.200904.12139@midway.uchicago.edu>
  513. ecr2@ellis.uchicago.edu (Corp Reed) writes:
  514.  
  515. > I have a rather large MPW .o file that I want to convert to a Think C
  516. > library.  I have looked at the manuals and couldn't find any obvious way
  517. > to do this.  The library is too large for oConv to work on.
  518.  
  519. The documentation for THINK C 5.0 tells how. See chapter 16 of the user
  520. manual. (I have never tried it myself.)
  521.  
  522.  
  523. - ---------------------------------------------------------------
  524. Roger Brown                           Roger.W.Brown@dartmouth.edu
  525. Courseware Development
  526. Dartmouth College, Hanover, NH
  527.  
  528.  
  529.  
  530. ---------------------------
  531.  
  532. From: wieser@acs.ucalgary.ca (Bernie Wieser)
  533. Subject: Bug in Sys70 SetFPos?
  534. Date: 17 Feb 92 03:38:59 GMT
  535. Organization: The University of Calgary, Alberta, Canada
  536.  
  537. I noticed something strange under System 7.0 and I am wondering if this
  538. is a bug or a feature.  I do not remember having this trouble under system
  539. 6.
  540.  
  541. When I am reading in a buffer and an EOF is reached, SetFPos will no longer
  542. function.  It too will return an EOF error.  For example, let's say you
  543. have a file 128 bytes long and do the following (assume the file is open
  544. and you are at pos 0) 
  545. long count = 256;
  546. err = FSRead(fd, &count, &buffer);
  547. err = SetFPos(fd, fsFromStart, 0);
  548. The SetFPos will fail, regardless of a low level (PB) or library call.
  549. I do not recall reading that reaching EOF effectively closes the file
  550. in InsideMac.  Is something wrong or is it just me?
  551.  
  552.  
  553. -- 
  554.  
  555.  
  556.  
  557. - -------------------------
  558.  
  559. From: databoy@mrcnext.cso.uiuc.edu (John Snook)
  560. Subject:  Bug in Sys70 SetFPos?
  561. Organization: University of Illinois at Urbana
  562. Date: Wed, 19 Feb 1992 05:45:23 GMT
  563.  
  564. wieser@acs.ucalgary.ca (Bernie Wieser) writes:
  565.  
  566.  
  567. >When I am reading in a buffer and an EOF is reached, SetFPos will no longer
  568. >function.  It too will return an EOF error.  For example, let's say you
  569.  
  570. I wrote several database tools that used SetFPos and they all worked fine on
  571. Sys 6, but didn't work under 7. I called Symantec's TS, and they had no advice.
  572. However, I never tried any of the FSS calls. I wonder if you might try those.
  573. I don't have the Behemoth IM vi with me & I can't remember if there is a new
  574. version of SetFPos.
  575. good luck
  576. j snook
  577.  
  578.  
  579.  
  580.  
  581.  
  582. - -------------------------
  583.  
  584. From: d88-jwa@hemul.nada.kth.se (Jon W{tte)
  585. Subject:  Bug in Sys70 SetFPos?
  586. Date: 19 Feb 92 11:38:55 GMT
  587. Organization: Royal Institute of Technology, Stockholm, Sweden
  588.  
  589. > databoy@mrcnext.cso.uiuc.edu (John Snook) writes:
  590.  
  591.    >When I am reading in a buffer and an EOF is reached, SetFPos will no longer
  592.    >function.  It too will return an EOF error.  For example, let's say you
  593.  
  594.    However, I never tried any of the FSS calls. I wonder if you might try those.
  595.    I don't have the Behemoth IM vi with me & I can't remember if there is a new
  596.    version of SetFPos.
  597.  
  598.  
  599. No there is not, since the FSS calls handle unopened files, while
  600. setfpos takes a fRefNum (hich hasn't changed since Darwin...)
  601.  
  602. --
  603. This Signature is distributed under the conditions of the Signature License,
  604. available at a fee from   h+@nada.kth.se  (Jon W{tte)  Reading the Signature
  605. implies that you accept to be bound by the terms in said License. Should you
  606. not agree on any of these terms, you must return the Signature unread to me.
  607.  
  608.  
  609.  
  610. - -------------------------
  611.  
  612. From: keith@Apple.COM (Keith Rollin)
  613. Subject:  Bug in Sys70 SetFPos?
  614. Date: 25 Feb 92 03:38:56 GMT
  615. Organization: Apple Computer Inc., Cupertino, CA
  616.  
  617. In article <D88-JWA.92Feb19123855@hemul.nada.kth.se> d88-jwa@hemul.nada.kth.se (Jon W{tte) writes:
  618. >> databoy@mrcnext.cso.uiuc.edu (John Snook) writes:
  619. >
  620. >   >When I am reading in a buffer and an EOF is reached, SetFPos will no longer
  621. >   >function.  It too will return an EOF error.  For example, let's say you
  622. >
  623. >   However, I never tried any of the FSS calls. I wonder if you might try those.
  624. >   I don't have the Behemoth IM vi with me & I can't remember if there is a new
  625. >   version of SetFPos.
  626. >
  627. >No there is not, since the FSS calls handle unopened files, while
  628. >setfpos takes a fRefNum (hich hasn't changed since Darwin...)
  629.  
  630. Jon answered this question, but I just wanted to point out a handy
  631. tip.  If you don't have IM VI and you want to know the interface to a
  632. certain call, there's no need to post a question to c.s.m.programmer.
  633. Just check your header files (in this case, Files.h or File.p).
  634.  
  635. -- 
  636. - ----------------------------------------------------------------------------
  637. Keith Rollin           ---            <Taligent .signature under construction>
  638. Disclaimer: Pretty soon, I really _won't_ be speaking for Apple...
  639.  
  640.  
  641.  
  642. - -------------------------
  643.  
  644. From: sr0o+@andrew.cmu.edu (Steven Ritter)
  645. Subject:  Bug in Sys70 SetFPos?
  646. Date: 25 Feb 92 15:24:18 GMT
  647. Organization: Doctoral student, Psychology, Carnegie Mellon, Pittsburgh, PA
  648.  
  649. >Jon answered this question, but I just wanted to point out a handy
  650. >tip.  If you don't have IM VI and you want to know the interface to a
  651. >certain call, there's no need to post a question to c.s.m.programmer.
  652. >Just check your header files (in this case, Files.h or File.p).
  653.  
  654. >Keith Rollin           ---            <Taligent .signature under construction>
  655. >Disclaimer: Pretty soon, I really _won't_ be speaking for Apple...
  656.  
  657. Which brings up a question.  Is there any way in Think C to search all
  658. the Apple header files?  Its frequently not obvious which file has the
  659. prototype.
  660.  
  661. Steve
  662.  
  663.  
  664.  
  665. - -------------------------
  666.  
  667. From: ericd@CATICSUF.CSUFRESNO.EDU (Eric W. Douglas)
  668. Subject:  Bug in Sys70 SetFPos?
  669. Date: 25 Feb 92 17:22:45 GMT
  670.  
  671.  
  672. sr0o+@andrew.cmu.edu (Steven Ritter) writes:
  673.  
  674. >>Jon answered this question, but I just wanted to point out a handy
  675. >>tip.  If you don't have IM VI and you want to know the interface to a
  676. >>certain call, there's no need to post a question to c.s.m.programmer.
  677. >>Just check your header files (in this case, Files.h or File.p).
  678.  
  679. >>Keith Rollin           ---            <Taligent .signature under construction>
  680. >>Disclaimer: Pretty soon, I really _won't_ be speaking for Apple...
  681.  
  682. >Which brings up a question.  Is there any way in Think C to search all
  683. >the Apple header files?  Its frequently not obvious which file has the
  684. >prototype.
  685.  
  686. Check out the latest issue of Symantec's magazine/newletter/etc... it has
  687. an article which will tell you how do this. (Sorry, I don't have it with me.)
  688.  
  689. --eric
  690.  
  691. * | Eric W. Douglas             Technojock               +1 209 897 5785 | *
  692. * | I'net: ericd@caticsuf.csufresno.edu      ericd@csufres.csufresno.edu | *
  693. * | AppleLink: STUDIO.D      Compuserve: 76170,1472       AOL: EWDOUGLAS | *
  694. * |                "if q -> p, and not p, then not q. NOT!"              | * 
  695.  
  696.  
  697.  
  698.  
  699. - -------------------------
  700.  
  701. From: suitti@ima.isc.com (Stephen Uitti)
  702. Subject:  Bug in Sys70 SetFPos?
  703. Organization: Interactive Systems, Cambridge, MA 02138-5302
  704. Date: Tue, 25 Feb 1992 17:19:34 GMT
  705.  
  706. >Is there any way in Think C to search all
  707. >the Apple header files?  Its frequently not obvious which file has the
  708. >prototype.
  709.  
  710. The common way to get this capability is to create a THINK C
  711. project that has a file that includes all the headers.  This
  712. would be a reasonable thing to have in the distrib.  I don't know
  713. why the project file for MacHeaders does not exist.  "Mac
  714. #includes.c" does exist, and could probably be used as a start in
  715. a project for searching.
  716.  
  717. Of course, someone could make one available for FTP.
  718. While on that topic, a TCLheaders project would be nice.
  719. I have one.
  720.  
  721. Stephen.
  722. suitti@ima.isc.com
  723.  
  724.  
  725.  
  726. - -------------------------
  727.  
  728. From: russotto@eng.umd.edu (Matthew T. Russotto)
  729. Subject:  Bug in Sys70 SetFPos?
  730. Date: Tue, 25 Feb 92 20:43:07 GMT
  731. Organization: University of Maryland, College Park, College of Engineering
  732.  
  733. In article <MdeZyWa00Uh7429gEv@andrew.cmu.edu> sr0o+@andrew.cmu.edu (Steven Ritter) writes:
  734.  
  735. >Which brings up a question.  Is there any way in Think C to search all
  736. >the Apple header files?  Its frequently not obvious which file has the
  737. >prototype.
  738.  
  739. Include <mac #includes.c> in some file in your project.  Then the multi-file
  740. find will find them.
  741.  
  742.  
  743. -- 
  744. Matthew T. Russotto    russotto@eng.umd.edu    russotto@wam.umd.edu
  745. Some news readers expect "Disclaimer:" here.
  746. Just say NO to police searches and seizures.  Make them use force.
  747. (not responsible for bodily harm resulting from following above advice)
  748.  
  749.  
  750.  
  751. - -------------------------
  752.  
  753. From: phils@chaos.cs.brandeis.edu (Phil Shapiro)
  754. Subject: How to search headers in THINK C (FAQ) [Was: Bug in Sys70 SetFPos?]
  755. Date: 25 Feb 92 20:57:34 GMT
  756. Organization: Symantec Corp.
  757.  
  758. In article <MdeZyWa00Uh7429gEv@andrew.cmu.edu> sr0o+@andrew.cmu.edu (Steven Ritter) writes:
  759.  
  760.    Is there any way in Think C to search all the Apple header files?
  761.    Its frequently not obvious which file has the prototype.
  762.  
  763. The easiest way is to just add the source file for your precompiled
  764. header to your project and compile it.  Once you've done that, you can
  765. search all of the header files by bringing up the Find dialog box and
  766. hitting Command-H. This selects all of the header files in your
  767. project, including all of the header files in your precompiled header.
  768.  
  769. If you're using the default precompile header file, MacHeaders, just
  770. add the file "Mac #includes.c" to your project and compile it.
  771.  
  772.     -phil
  773. --
  774.    Phil Shapiro                           Technical Support Analyst
  775.    Language Products Group                     Symantec Corporation
  776.         Internet: phils@chaos.cs.brandeis.edu
  777.  
  778.  
  779.  
  780. - -------------------------
  781.  
  782. From: keith@Apple.COM (Keith Rollin)
  783. Subject:  Bug in Sys70 SetFPos?
  784. Date: 25 Feb 92 03:38:56 GMT
  785. Organization: Apple Computer Inc., Cupertino, CA
  786.  
  787. In article <D88-JWA.92Feb19123855@hemul.nada.kth.se> d88-jwa@hemul.nada.kth.se (Jon W{tte) writes:
  788. >> databoy@mrcnext.cso.uiuc.edu (John Snook) writes:
  789. >
  790. >   >When I am reading in a buffer and an EOF is reached, SetFPos will no longer
  791. >   >function.  It too will return an EOF error.  For example, let's say you
  792. >
  793. >   However, I never tried any of the FSS calls. I wonder if you might try those.
  794. >   I don't have the Behemoth IM vi with me & I can't remember if there is a new
  795. >   version of SetFPos.
  796. >
  797. >No there is not, since the FSS calls handle unopened files, while
  798. >setfpos takes a fRefNum (hich hasn't changed since Darwin...)
  799.  
  800. Jon answered this question, but I just wanted to point out a handy
  801. tip.  If you don't have IM VI and you want to know the interface to a
  802. certain call, there's no need to post a question to c.s.m.programmer.
  803. Just check your header files (in this case, Files.h or File.p).
  804.  
  805. -- 
  806. - ----------------------------------------------------------------------------
  807. Keith Rollin           ---            <Taligent .signature under construction>
  808. Disclaimer: Pretty soon, I really _won't_ be speaking for Apple...
  809.  
  810.  
  811.  
  812. - -------------------------
  813.  
  814. From: d88-jwa@hemul.nada.kth.se (Jon W{tte)
  815. Subject:  Bug in Sys70 SetFPos?
  816. Date: 25 Feb 92 22:48:06 GMT
  817. Organization: Royal Institute of Technology, Stockholm, Sweden
  818.  
  819. > sr0o+@andrew.cmu.edu (Steven Ritter) writes:
  820.  
  821.    Which brings up a question.  Is there any way in Think C to search all
  822.    the Apple header files?  Its frequently not obvious which file has the
  823.    prototype.
  824.  
  825. Yes:
  826.  
  827. Include Mac #includes.c in your project ! It takes some time to
  828. compile the first time, but then it generates no code and adds in
  829. all the headers you use.
  830.  
  831. One good tip: turn OFF SIMPLIFY_PROTOTYPES, turn ON all header
  832. files except one of the print headers, and precompile, giving a
  833. MacHeaders that's about 350k. Now, compilation will go faster
  834. since you won+t have to load any apple headers separately,
  835. everything is available without hassle, AND the think class
  836. library "starter" project file is WAY below 1 meg in size when
  837. compiled ! A great space saver !
  838.  
  839. --
  840. This Signature is distributed under the conditions of the Signature License,
  841. available at a fee from   h+@nada.kth.se  (Jon W{tte)  Reading the Signature
  842. implies that you accept to be bound by the terms in said License. Should you
  843. not agree on any of these terms, you must return the Signature unread to me.
  844.  
  845.  
  846.  
  847. ---------------------------
  848.  
  849. From: david@oahu.cs.ucla.edu (David Dantowitz)
  850. Subject: MoveWindow using unused stack portion as scratch?
  851. Date: 19 Feb 92 17:42:14 GMT
  852. Organization: UCLA Computer Science Department
  853.  
  854.  
  855. /*
  856. The following file contains five routines that demonstrate a problem 
  857. I am having with unused portions of my stack being randomly written.  
  858. I can't track this thing down to a code bug, but perhaps someone else can.  
  859.  
  860. It appears that MoveWindow is using a portion of the stack (that is currently
  861. unused) for temporary workspace.  It always uses the same offset from the
  862. top address of the stack (GetApplLimit()).  This can be tested by increasing
  863. the stack region.
  864.     
  865. Any help would be appreciated.  I'm using the stack marking code to calculate
  866. how much stack space my application is using.  (This is for a very complicated
  867. application (3Meg of source) that periodically checks out.  The symptoms are
  868. bad status errors from the SCSI manager (stat values like -3453).  The problem
  869. got better when we switched from an Apollyonics driver to SilverLining, but
  870. the problem remains.  My first guess is stack overflow, which lead me to
  871. the enclosed problem.  My second guess is memory somewhere being overwritten, 
  872. and my third guess is bad SCSI Manager calls, but they really look fine.)
  873.     
  874.     
  875.     
  876.     
  877.     
  878. _profile_ is a substute profiler routine that I used to track down the
  879. offending stack-writing code.
  880.     
  881. TestWindow contains two lines of code from the new_console routine in
  882. the console.c file from the THINK C ANSI library.  The problem starts
  883. here.
  884.     
  885. CheckStack checks to see how much of the stack has been used.
  886.     
  887. MarkStack marks the stack with an initial pattern
  888.     
  889. Recurse is a simple routine that just uses stack space
  890.     
  891.     
  892. Machine configuration: System 7.0.1, IIci, 4Mb, NO EXTENSIONS, no cache card
  893.     
  894. Thanks,
  895.     
  896. David Dantowitz
  897. david@cs.ucla.edu
  898.     
  899. */ 
  900.  
  901.  
  902. /*
  903. Set this constant to 1 to have CheckStack print its results each time.
  904. It was the call to printf in CheckStack that lead me to notice the 
  905. code in new_console that was writing to the stack.
  906.     
  907. Leave this code disabled to use the code in TestWindow first.
  908. */
  909.  
  910. #define CHECK_PRINT 0
  911.  
  912. #include <MacHeaders>
  913.  
  914. #include <stdio.h>
  915.  
  916. #define BASESKIP 256                    // Leave this space at the bottom of the stack
  917. #define TOPSKIP 1024                    // Leave this space at the top of the stack
  918.  
  919.  
  920. long *base=NULL, *top=NULL;
  921.  
  922.  
  923. #pragma options(!profile)
  924.  
  925. // A profile substitute that checks the stack use
  926.  
  927. /*
  928.  *  _profile_ - profiler entry point
  929.  *
  930.  *  Each function compiled with the "Profile" option begins with a call
  931.  *  to _profile_("\pfuncname").
  932.  *
  933.  */
  934.  
  935. void
  936. _profile_(unsigned char *fname);
  937.  
  938. void
  939. _profile_(unsigned char *fname)
  940. {
  941.     long *i;
  942.     
  943.     for (i=top; i < base; i++)
  944.         if (*i != 'Mark')
  945.             break;
  946.             
  947.     i = (long *) (((long *)CurStackBase-i)*4);
  948.  
  949.     if (top != NULL && (long)i > 20*1024)
  950.         Debugger();
  951.         
  952.     return;
  953. }
  954.  
  955.  
  956. // The following routine contains code that was lifted from console.c:new_console 
  957. // from the ANSI C library included with THINK C 5 ()1991 Symantec Corporation)
  958. // This code is where writing to the stack begins.
  959.  
  960. void
  961. TestWindow(void);
  962.  
  963. static Rect r={100, 100, 200, 200};
  964.  
  965. void TestWindow()
  966. {
  967.     WindowPtr window;
  968.     
  969.     window = NewWindow(0, &r, "\ptitle", 0, 8, (Ptr) -1, 0, 0);
  970.     MoveWindow(window, 100, 100, 0);
  971. }
  972.  
  973. long
  974. CheckStack(void);                        // Check the stack use    
  975.  
  976. long
  977. CheckStack()                            // Check the stack use    
  978. {
  979.     long *i;
  980.     
  981.     for (i=top; i < base; i++)
  982.         if (*i != 'Mark')
  983.             break;
  984.             
  985.             
  986. #if CHECK_PRINT
  987.     printf("%ld bytes used\n", ((long *)CurStackBase-i)*4);
  988. #endif
  989.  
  990.     return (((long *)CurStackBase-i)*4);
  991. }
  992.  
  993.  
  994. void
  995. MarkStack(void);                        // mark the stack
  996.  
  997. void
  998. MarkStack()                                // mark the stack
  999. {
  1000.     long *i;
  1001.  
  1002.     base = (long *)(CurStackBase - BASESKIP);        // skip first BASESKIP bytes
  1003.     top = (long *)(GetApplLimit() + TOPSKIP);        // skip last TOPSKIP bytes
  1004.     
  1005.     base = (long *) ((long) base & -4);                // 4-byte align the values
  1006.     top = (long *) ((long) top & -4);
  1007.     
  1008.     for (i=top; i < base; i++)
  1009.         *i = 'Mark';
  1010. }
  1011.  
  1012.  
  1013. // A test routine used to USE the stack.
  1014.  
  1015. #define TYPE long
  1016.  
  1017. TYPE
  1018. Recurse(TYPE);
  1019.  
  1020. TYPE
  1021. Recurse(TYPE d)
  1022. {
  1023.     TYPE temp=d;
  1024.     
  1025.     if (d > 0)
  1026.         temp *= Recurse(d-1);
  1027.     else
  1028.         temp = 1;
  1029.         
  1030.     return temp;
  1031. }
  1032.  
  1033. main()
  1034. {
  1035.     long i;
  1036.     TYPE d;
  1037.     
  1038. #if 1
  1039. /* 
  1040.    Increase the stack size by X bytes bytes.
  1041. */
  1042.     SetApplLimit(GetApplLimit() - 20*(long)1024);
  1043. #endif
  1044.  
  1045.  
  1046.  
  1047.  
  1048. MarkStack();
  1049. i = CheckStack();
  1050.  
  1051. d = Recurse(500);
  1052. i = CheckStack();
  1053.  
  1054. d = Recurse(600);
  1055. i = CheckStack();
  1056.  
  1057. d = Recurse(700);
  1058. i = CheckStack();
  1059.  
  1060. d = Recurse(800);
  1061. i = CheckStack();
  1062.  
  1063. TestWindow();
  1064. i = CheckStack();
  1065.  
  1066.  
  1067. #if CHECK_PRINT
  1068. printf("%ld bytes used\n", i);
  1069. #endif
  1070.  
  1071. i = CheckStack();
  1072.  
  1073. }
  1074. -- 
  1075. David Dantowitz
  1076. david@cs.ucla.edu
  1077.  
  1078. Singing Barbershop when I'm not computing...
  1079.  
  1080.  
  1081.  
  1082. - -------------------------
  1083.  
  1084. From: keith@Apple.COM (Keith Rollin)
  1085. Subject:  MoveWindow using unused stack portion as scratch?
  1086. Date: 25 Feb 92 03:46:22 GMT
  1087. Organization: Apple Computer Inc., Cupertino, CA
  1088.  
  1089. In article <1992Feb19.174214.14312@cs.ucla.edu> david@oahu.cs.ucla.edu (David Dantowitz) writes:
  1090. >
  1091. >The following file contains five routines that demonstrate a problem 
  1092. >I am having with unused portions of my stack being randomly written.  
  1093. >I can't track this thing down to a code bug, but perhaps someone else can.  
  1094. >
  1095. >It appears that MoveWindow is using a portion of the stack (that is currently
  1096. >unused) for temporary workspace.  It always uses the same offset from the
  1097. >top address of the stack (GetApplLimit()).  This can be tested by increasing
  1098. >the stack region.
  1099.  
  1100. MoveWindow, of course, calls CopyBits to move the contents of the window to
  1101. their new location. As part of its functioning, CopyBits can use up to all
  1102. but 1K of the stack for temporary buffers. Could this be what you are seeing?
  1103.  
  1104. -- 
  1105. - ----------------------------------------------------------------------------
  1106. Keith Rollin           ---            <Taligent .signature under construction>
  1107. Disclaimer: Pretty soon, I really _won't_ be speaking for Apple...
  1108.  
  1109.  
  1110.  
  1111. ---------------------------
  1112.  
  1113. From: kaas@iastate.edu (Gerald E Kaas)
  1114. Subject: Closing windows in MacApp
  1115. Date: 20 Feb 92 05:46:48 GMT
  1116. Organization: Iowa State University, Ames IA
  1117.  
  1118. I was wondering if there was a way to detect if the user has closed a window
  1119. that I opened without overriding TWindow or a TView.
  1120.  
  1121.  
  1122.  
  1123. - -------------------------
  1124.  
  1125. From: mlanett@void.ncsa.uiuc.edu (Mark Lanett)
  1126. Subject:  Closing windows in MacApp
  1127. Organization: University of Illinois at Urbana
  1128. Date: Thu, 20 Feb 1992 06:56:46 GMT
  1129.  
  1130. kaas@iastate.edu (Gerald E Kaas) writes:
  1131.  
  1132. >I was wondering if there was a way to detect if the user has closed a window
  1133. >that I opened without overriding TWindow or a TView.
  1134.  
  1135. After the fact? You could search the window list in the document if you still
  1136. have the pointer; if the window is set to free on close then not finding the
  1137. pointer in the list will mean that it's been closed. Of course if it's *not*
  1138. set to free on close then you can just call IsVisible or something like that
  1139. on the window.
  1140.  
  1141. Under MacApp 3 one could also make a dependant on the window; that send some
  1142. sort of message (mClosing?) when they go away.
  1143.  
  1144. -- 
  1145. Mark Lanett                                                   mlanett@uiuc.edu
  1146. Software Tools Group, NCSA, University of Illinois at Urbana-Champaign
  1147.  
  1148.  
  1149.  
  1150. - -------------------------
  1151.  
  1152. From: keith@Apple.COM (Keith Rollin)
  1153. Subject:  Closing windows in MacApp
  1154. Date: 25 Feb 92 03:41:51 GMT
  1155. Organization: Apple Computer Inc., Cupertino, CA
  1156.  
  1157. In article <kaas.698564808@vincent1.iastate.edu> kaas@iastate.edu (Gerald E Kaas) writes:
  1158. >I was wondering if there was a way to detect if the user has closed a window
  1159. >that I opened without overriding TWindow or a TView.
  1160.  
  1161. Mark Lannett has posted some handy tips here, but I just wanted to ask
  1162. a follow-up question: What's wrong with sub-classing TWindow? From my
  1163. memory of MacApp and from the way you ask your question, it seems that
  1164. sub-classing TWindow is the right thing. If so, why don't you want to
  1165. do that?
  1166.  
  1167. -- 
  1168. - ----------------------------------------------------------------------------
  1169. Keith Rollin           ---            <Taligent .signature under construction>
  1170. Disclaimer: Pretty soon, I really _won't_ be speaking for Apple...
  1171.  
  1172.  
  1173.  
  1174. ---------------------------
  1175.  
  1176. From: potts@itl.itd.umich.edu (Paul Potts)
  1177. Subject: Comm Toolbox problems with THINK C in XCMD environment
  1178. Date: 17 Feb 92 19:06:30 GMT
  1179. Organization: Instructional Technology Laboratory, University of Michigan
  1180.  
  1181. [I'm posting this for an officemate. If you reply by mail, send to
  1182. mnowak@umich.edu]
  1183.  
  1184. Our group is working on software which uses the CommToolBox to communicate from
  1185. a client to a server, using ADSP protocols.  We're also working on an XCMD so
  1186. HyperCard and SuperCard applications can access our server.
  1187.  
  1188. In working on this XCMD, I've been having some strange crashes, particularly
  1189. when using the NuLookup routine.  Other tahn suspecting my code, I wonder if I
  1190. can really use the CommToolBox library in an XCMD.  Symantec says in the THINK
  1191. C manual that you can use MacTraps and MacTraps2 since they do not access
  1192. globals.  It sounds like I should modify the other libraries to use A4, but I
  1193. can't since I don't have the source for them.
  1194.  
  1195. Any suggestions?
  1196.  
  1197. Mike Nowak,
  1198. U-M Office of Instructional Technology.
  1199. - -----
  1200.  
  1201.  
  1202. -- 
  1203.          -Paul Potts-potts@itl.itd.umich.edu- 
  1204. "Wrong is wrong, even if it helps you." - Popeye
  1205.  
  1206.  
  1207.  
  1208. - -------------------------
  1209.  
  1210. From: Roger.W.Brown@dartmouth.edu (Roger W. Brown)
  1211. Subject:  Comm Toolbox problems with THINK C in XCMD environment
  1212. Date: 25 Feb 92 17:13:49 GMT
  1213. Organization: Dartmouth College, Hanover, NH
  1214.  
  1215. In article <1992Feb17.190630.17541@terminator.cc.umich.edu>
  1216. potts@itl.itd.umich.edu (Paul Potts) writes:
  1217.  
  1218. > In working on this XCMD, I've been having some strange crashes, 
  1219. > particularly when using the NuLookup routine.  Other tahn suspecting my 
  1220. > code, I wonder if I can really use the CommToolBox library in an XCMD.
  1221.  
  1222. I have succesfully used the CommToolBox in an XCMD. That was in THINK C
  1223. version 4, using a library that I converted from MPW. I have not tried
  1224. the one that comes with THINK C version 5 yet. But I asked Symantec if
  1225. it would work in a CODE resource as is and they said that it should. If
  1226. you do a "Get Info" on each piece of the library, you can see that no
  1227. data are allocated.
  1228.  
  1229. I did detect what appear to be some inconsistencies between the
  1230. interface files (Comm... .h) and the documentation for CTB version 1.0.
  1231. I don't have those with me right now, unfortunately.
  1232.  
  1233. One thing to consider (this caused weird crashes for me once) is the
  1234. use of XCMD globals and callback routines. NuLookUp has procedure
  1235. parameters. If you use these and the procedures that they point to use
  1236. data that are global to your XCMD, then make sure to RememberA4()
  1237. before calling NuLookup and SetUpA4() and RestoreA4() in those
  1238. procedures. Also (here was the one that got me), make sure that all
  1239. those calls dealing with A4 are IN THE SAME SOURCE FILE! (see page 110
  1240. of the version 5 User Manual).
  1241.  
  1242.  
  1243. - ---------------------------------------------------------------
  1244. Roger Brown                           Roger.W.Brown@dartmouth.edu
  1245. Courseware Development
  1246. Dartmouth College, Hanover, NH
  1247.  
  1248.  
  1249.  
  1250. ---------------------------
  1251.  
  1252. From: czychi@bernina.ethz.ch (Gary Czychi)
  1253. Subject: OOP Power for TP Programmers  Was: Re: Book for TCL
  1254. Date: 20 Feb 92 17:41:26 GMT
  1255. Organization: Swiss Federal Institute of Technology (ETH), Zurich, CH
  1256.  
  1257. There is a book called
  1258.  
  1259.     Object-Oriented Programming Power for THINK Pascal Programmers
  1260.  
  1261. its 680 pages, but I don't know who wrote it, who published it and if it is
  1262. good.
  1263.  
  1264. If someone out there knows this book or is going to buy it, please send a
  1265. small review to this list or to me personally.
  1266.  
  1267. Thanks a lot,
  1268.  
  1269.   Gary
  1270.  
  1271.     Gary T. Czychi          University of St.Gallen
  1272.  
  1273.        czychi@alpha.unisg.ch (preferred host)
  1274.          czychi at csghsg52   (=bitnet)
  1275.            czychi@bernina.ethz.ch
  1276.              Switzerland
  1277.               -
  1278.  
  1279.  
  1280.  
  1281. - -------------------------
  1282.  
  1283. Subject:  OOP Power for TP Programmers  Was: Re: Book for TCL
  1284. From: Bruce.Hoult@bbs.actrix.gen.nz
  1285. Date: Fri, 21 Feb 1992 16:35:32 GMT
  1286. Organization: Actrix Information Exchange
  1287.  
  1288. In article <1992Feb20.174126.2577@bernina.ethz.ch> czychi@bernina.ethz.ch (Gary Czychi) writes:
  1289. > There is a book called
  1290. >     Object-Oriented Programming Power for THINK Pascal Programmers
  1291. > its 680 pages, but I don't know who wrote it, who published it and if it is
  1292. > good.
  1293. > If someone out there knows this book or is going to buy it, please send a
  1294. > small review to this list or to me personally.
  1295.  
  1296.  
  1297. I was recently given a copy of this book, but I haven't (yet) read it.
  1298.  
  1299. Details:
  1300.  
  1301. Title: Object-Oriented Programming Power for THINK Pascal Programmers
  1302. Author: Chuck Sphar
  1303. Publisher: Microsoft Press
  1304. ISBN: 1-55615-348-1
  1305. 704 pages + 1 disk.  $39.95
  1306. Pub. Date: Aug 5, 1991
  1307.  
  1308.  
  1309. Hope this helps...
  1310.  
  1311. -- Bruce
  1312.  
  1313. -- 
  1314. Bruce.Hoult@bbs.actrix.gen.nz   Twisted pair: +64 4 477 2116
  1315. BIX: brucehoult                 Last Resort:  PO Box 4145 Wellington, NZ
  1316. "Cray's producing a 200 MIPS personal computer with 64MB RAM and a 1 GB
  1317. hard disk that fits in your pocket!"   "Great!  Is it PC compatable?"
  1318.  
  1319.  
  1320.  
  1321. - -------------------------
  1322.  
  1323. From: irobinson@cix.compulink.co.uk (Ian Robinson)
  1324. Subject:  OOP Power for TP Programmers Was: Re: Book for TCL
  1325. Date: 21 Feb 92 23:39:59 GMT
  1326. Organization: Gated to News by demon.co.uk
  1327.  
  1328.  
  1329. In article <1992Feb20.174126.2577@bernina.ethz.ch>, czychi@bernina.ethz.ch (Ga-
  1330. ry
  1331.  Czychi) writes:
  1332. >There is a book called
  1333. >
  1334. > Object-Oriented Programming Power for THINK Pascal Programmers
  1335. >
  1336. >its 680 pages, but I don't know who wrote it, who published it and if it is
  1337. >good.
  1338. >
  1339. >If someone out there knows this book or is going to buy it, please send 
  1340. >a small review to this list or to me personally.
  1341.  
  1342. I got a copy of this book last week. It is a very good introduction to object -
  1343.  
  1344. orientated programming using Object Pascal. It does not tell you how to use th-
  1345. Think Class Library as such. It rather attempts to teach OOP concepts by 
  1346. building a collection of classes known as PicoAPP(which are included on disk).-
  1347.  
  1348.  
  1349. Check it out in a book store before buying if you can, A replacement TCL manua-
  1350. it isn't, but very good as an OOP tutorial and I'm glad I bought a copy.
  1351.  
  1352. Details of book:-
  1353. Object-Orientated Programming Power for Think Pascal Programmers
  1354. by Chuck Sphar
  1355. Published by Microsoft Press
  1356. ISBN = 1-55615-348-1
  1357. Price (US = 39.95 dollars) (UK = 35.95 pounds)
  1358.  
  1359. Ian Robinson
  1360.  
  1361. *************************************************************************
  1362. *  Ian Robinson                         Computer Department             *
  1363. *                                       Stewarts Supermarkets Limited   *
  1364. *  irobinson@cix.compulink.co.uk        224 Castlereagh Road            *
  1365. *                                       Belfast                         *
  1366. *                                       BT5 7AJ                         *
  1367. *                                       Northern Ireland                *
  1368. *                                       United Kingdom                  *
  1369. *************************************************************************
  1370.  
  1371.  
  1372.  
  1373. - -------------------------
  1374.  
  1375. From: orpheus@reed.edu (P. Hawthorne)
  1376. Subject:  OOP Power for TP Programmers Was: Re: Book for TCL
  1377. Date: 23 Feb 92 06:57:29 GMT
  1378. Organization: Reed College, Portland OR
  1379.  
  1380.  
  1381.   czychi@bernina.ethz.ch (GARY CZYCHI) writes:
  1382. : There is a book called Object-Oriented Programming Power for THINK Pascal
  1383. : Programmers...  If someone out there....
  1384.  
  1385.   irobinson@cix.compulink.co.uk (IAN ROBINSON) writes:
  1386. : I got a copy of this book last week. It is a very good introduction to
  1387. : object orientated programming using Object Pascal. It does not tell you
  1388. : how to use the Think Class Library as such. It rather attempts to teach
  1389. : OOP concepts by building a collection of classes known as PicoAPP(which
  1390. : are included on disk).-
  1391. : Details of book: Published by Microsoft Press.... ISBN = 1-55615-348-1
  1392.  
  1393.   Rumor says that it was intended to be an object oriented programming
  1394. book but that the whiz kid marketing snots at Microsoft Press thought
  1395. that the Object Pascal nature of the source code would reduce the number
  1396. of people who would buy it as a general text.
  1397.   Plodding along, trying to be as Gatesian as they could work up, they
  1398. hamstrung the impact of this damn fine analysis of the very fundamentals
  1399. of run time binding and getting recursion "for free," as it was put at
  1400. one of the SIGGRAPH panels this year.
  1401.   Microsoft should be busted up into hundreds of tiny pieces before they
  1402. can come up with a dial tone cable connection, but I digress.
  1403.   Of course, much of it is specifically around making Think Pascal
  1404. compile an actual library file. This was of use to me for an important
  1405. presentation, and I can see the worth of it.
  1406.  
  1407. It teaches one nothing about programming that one cannot learn from using
  1408. the Think Class Library with vigor. However, as an insight into the
  1409. approach of an object oriented evangelist pushing his code, it is much
  1410. more direct and expressive.
  1411.   Suffice it to say, if the idea of a compiler directive or a handle
  1412. bothers you, don't even bother with it.
  1413.  
  1414.     Theus (orpheus@reed.edu)
  1415.  
  1416.  
  1417.  
  1418. - -------------------------
  1419.  
  1420. From: kemper@millelac.rhrk.uni-kl.de (Michael Kemper [Informatik])
  1421. Subject:  OOP Power for TP Programmers  Was: Re: Book for TCL
  1422. Date: 25 Feb 92 10:56:30 GMT
  1423. Organization: University of Kaiserslautern (Germany)
  1424.  
  1425. In article <1992Feb20.174126.2577@bernina.ethz.ch>, czychi@bernina.ethz.ch (Gary Czychi) writes:
  1426. |>There is a book called
  1427. |>
  1428. |>    Object-Oriented Programming Power for THINK Pascal Programmers
  1429. |>
  1430. |>its 680 pages, but I don't know who wrote it, who published it and if it is
  1431. |>good.
  1432. |>
  1433. |>If someone out there knows this book or is going to buy it, please send a
  1434. |>small review to this list or to me personally.
  1435. |>
  1436. |>Thanks a lot,
  1437.  
  1438. The author is Chuck Sphar, Microsoft Press 1991
  1439.  
  1440. I saw the book last week, it seems to be good for learning OOP, but
  1441. doesn't give information about the Think Class Library, it just builds its own (little) Class Library. Disk is included and it costs DM 88,- (in Germany). 
  1442.                       
  1443. |\/|ichael |<emper
  1444. University Kaiserslautern
  1445. Germany
  1446.  
  1447.  
  1448.  
  1449. ---------------------------
  1450.  
  1451. End of C.S.M.P. Digest
  1452. **********************
  1453.